//package com.lottery.ruok.lottrey.adapter.fragmentManager;
//
//import com.lottery.ruok.lottrey.fragment.BaseMainFragment;
//import com.lottery.ruok.lottrey.fragment.BuyLotteryMainFragment;
//import com.lottery.ruok.lottrey.fragment.ChatMainFragment;
//import com.lottery.ruok.lottrey.fragment.HomeMainFragment;
//import com.lottery.ruok.lottrey.fragment.MemberMainFragment;
//import com.lottery.ruok.lottrey.fragment.PrizeMainFragment;
//
//import java.util.HashMap;
//
//public class MainFragmentManager {
//
//    public static final int TYPE_HOME = 0;//
//    public static final int TYPE_BUY_LOTTERY = 1;
//    public static final int TYPE_PRIZE = 2;
//    public static final int TYPE_CHAT = 3;
//    public static final int TYPE_MEMBER = 4;
//
//    private static HashMap<Integer, BaseMainFragment> map = new HashMap<>();
//
//    public static BaseMainFragment getFragment(int key) {
//        if (map.containsKey(key)) {
//            return map.get(key);
//        }
//        BaseMainFragment fragment = null;
//        switch (key) {
//            case TYPE_HOME:
//                fragment = new HomeMainFragment();
//                break;
//            case TYPE_BUY_LOTTERY:
//                fragment = new BuyLotteryMainFragment();
//                break;
//            case TYPE_PRIZE:
//                fragment = new PrizeMainFragment();
//                break;
//            case TYPE_CHAT:
//                fragment = new ChatMainFragment();
//                break;
//            case TYPE_MEMBER:
//                fragment = new MemberMainFragment();
//                break;
//        }
//        map.put(key, fragment);
//        return fragment;
//    }
//
//    public static int getSize() {
//        return 5;
//    }
//}
